﻿<!doctype html>
<html>
    <head>
    <title>
    <vt:if var="state.state" value="0" compare="<=" mark="考试不存在">{$org.org_platformname}
      <vt:else/>
      考试：《{$exam.exam_name}》 -- {$org.org_platformname}</vt:if>
    </title>
    <vt:include file="inc/meta.inc" />
    <link href="Styles/examing.css?ver={$version}" rel="stylesheet" type="text/css" />
     <link href="/manage/Styles/Jme.css?ver={$version}" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="CoreScripts/ajaxfileupload.js?ver={$version}"></script>
    <script type="text/javascript" src="CoreScripts/public.js?ver={$version}"></script>
    <script type="text/javascript" src="Scripts/examing.js?ver={$version}"></script>
    <script type="text/javascript" src="Scripts/Mask.js?ver={$version}"></script>
  
      <script language="javascript" type="text/javascript" path="">
          //当前服务器端时间
          var ServerTime = eval('new ' + eval('/Date({$servertime})/').source);
          //当前客户端时间
          var ClientTime = new Date();
          //试卷ID,学科id
          var testPagerID = Number("{$pager.Tp_Id}");
          var subjectID = Number("{$pager.sbj_id}");
          var subjectName = "{$pager.sbj_name}";
          //是否开始，是否结束
          var isStart = "{$isStart}" == "true" ? true : false;
          var isOver = "{$isOver}" == "true" ? true : false;
          //考试ID
          var examID = Number("{$exam.exam_id}");
          //唯一ID,考试主题
          var uid = "{$uid}";
          var theme = "{$theme.Exam_Title}";
          //考生ID，姓名，性别，分类Id,身份证号
          var stid = Number("{$Account.Ac_id}");
          var stname = "{$Account.Ac_name}";
          var stacc = "{$Account.Ac_AccName}";
          var stsex = "{$Account.Ac_Sex}";
          var stsid = "{$Account.Sts_ID}";
          var stcardid = "{$Account.Ac_IDCardNumber}";
		  
    </script>
      <script language="javascript" type="text/javascript">
          var exam = new Examing();
          //考试主题，uid
          exam.attr.theme = "{$theme.Exam_Title}";
          exam.attr.uid = "{$uid}";
          //获取来自服务器端的时间，以保证所有客户端时间统一
          exam.time.server = ServerTime;
          //当前考试的时限，单位分钟
          exam.time.span = Number("{$exam.Exam_Span}");
          //考试开始时间         
          exam.time.begin = eval('new ' + eval('/Date({$startTime})/').source);;
          //考试的结束时间
          exam.time.over = new Date(exam.time.begin.getTime() + exam.time.span * 60 * 1000);
          //是否交过卷
          exam.state.submit = Boolean(eval("{$isSubmit}"));
		  //一些参数
		  exam.attr.isToggleWindows = "{$exam.Exam_IsToggle}"=="True";
		  exam.attr.isRightClick = "{$exam.Exam_IsRightClick}"=="True";
		  exam.attr.isShowBtn = "{$exam.Exam_IsShowBtn}"=="True";
		  window.exam=exam;
		  window.onload=function(){
			   window.exam.Init();
			  //循环时间计算方法，一切事务从此开始
			  window.exam.TimeCalc();
			  setInterval("window.exam.TimeCalc()", 1000);
		  }
		 
    </script>

    </head>
    <body>

<!--是否允许考试：{$state.IsEnable} ；状态码：{$state.state}-->
<div id="Context">
      <vt:if var="state.IsEnable" value="false" compare="=" mark="不能考试">
    <vt:if var="state.state" value="-2" compare="=" mark="状态异常">
          <div class="infobox">
        <div class="info"> 状态异常！</div>
      </div>
        </vt:if>
    <vt:if var="state.state" value="-1" compare="=" mark="未登录">
          <div class="infobox">
        <div class="info"> 未登录！</div>
      </div>
        </vt:if>
    <vt:if var="state.state" value="0" compare="=" mark="考试不存在">
          <div class="infobox">
        <div class="info"> 当前考试不存在！</div>
      </div>
        </vt:if>
  </vt:if>
      <vt:if var="state.state" value="0" compare=">" mark="考试详情">
    <div id="themeBox">
          <div class="theme"> {$theme.Exam_Title} </div>
          <div class="themesub"> 第{$exam.exam_tax}场 - 《{$exam.Exam_name}》 </div>
          <div class="examInfo"> 本卷所属学科《{$exam.sbj_name}》，共<span class="tpcount" title="共计多少道题">{$pager.Tp_Count}</span>道题，限时{$exam.Exam_Span}分钟，{$exam.Exam_PassScore}分及格/总分 {$exam.Exam_Total}分。</div>
        </div>
  </vt:if>
      <vt:if var="state.state" value="1" compare="=" mark="考试已经结束">
    <div id="examOverBox">
          <div class="title"> 当前考试已经结束或超出了已经允许的时间范围！</div>
          <div class="time">开始时间：<span class="startTime">{$startTime  format="yyyy-MM-dd HH:mm:ss"}</span></div>
          <div class="time">结束时间：<span class="overTime">{$overTime  format="yyyy-MM-dd HH:mm:ss"}</span> </div>
        </div>
  </vt:if>
      <vt:if var="state.state" value="2" compare="=" mark="不在参考人员范围内">
    <div id="examSubmitBox">
          <div class="title"> 您不需要参加此次考试</div>
          <div class="text"> 当前考试所设定的参考人员范围中，并不包括您在内。</div>
        </div>
  </vt:if>
      <vt:if var="state.state" value="3" compare="=" mark="已经交过卷了">
    <div id="examSubmitBox">
          <div class="title"> 本场考试您已经交过卷了！</div>
          <!--<div class="text"> <a href="examing.ashx?id={$exam.exam_id}&again=1">重新考试！</div>--> 
        </div>
  </vt:if>
      <vt:if var="state.IsEnable" value="true" compare="=" mark="允许考试时，才输出"> 
    <!--考试试卷答题区域 -->
    <div id="pagerArea">
          <div id="distanceTime">
        <div class="timeTitle"> 考试还未开始，请等待……</div>
        <div class="currTime">当前时间：<span id="currTime"></span> &nbsp;&nbsp;&nbsp;&nbsp; 还差 <span class="mm">0</span>分<span class="ss">0</span>秒 </div>
        <div class="timeArea"></div>
      </div>
        </div>
    <!--答题信息的显示区域 -->
    <div class="pagerCard">
          <div class="topBox">
          <div class="top-left"> <img src="{$stpath}{$:#.Account.Ac_photo}" style="height:120px;width:100%;" default="images/noPhoto.jpg"/>
          <div class="acc-name">{$:#.Account.Ac_Name}</div>
           </div>
          <div class="top-right">
        <div id="startTime">开始时间：<span class="startTime">{$startTime  format="yyyy-MM-dd HH:mm:ss"} </span> </div>
        <div id="residueTime"> <span class="mm">0</span>:<span class="ss">0</span> </div>
         <div id="pagerSubmitBox" class="noStart"> </div>
        </div>
      </div>
      
         
          <!--答题卡 -->
          <div class="quesCard">
        <div class="cardTit">
              <div class="txt">答题卡</div>
              <div class="number">完成<span id="CompleteNumber">0</span>道 / 共<span class="tpcount" title="共计多少道题">{$pager.Tp_Count}</span>道</div>
            </div>
        <div id="cardBox"></div>
      </div>
        </div>
  </vt:if>
    </div>
    <div id="result">{$result.Exr_Results}</div>
</body>
</html>
